package com.iflytek.cosmo.ocr.common.constant;

import org.springframework.http.HttpStatus;

/**
 *  异常状态码常量定义
 *  @author ljhan2
 */
public abstract class ExceptionCodeConstant {

	/**
	 * <code>DEFAULT_EXCEPTION_CODE</code>默认异常状态码500
	 */
	public static final int DEFAULT_EXCEPTION_CODE = HttpStatus.INTERNAL_SERVER_ERROR.value();

	/**
	 * <code>PARAM_PARSE_EXCEPTION_CODE</code>参数解析异常状态码400
	 */
	public static final int PARAM_PARSE_EXCEPTION_CODE = HttpStatus.BAD_REQUEST.value();

	/**
	 * <code>TARGET_NOT_EXIST_EXCEPTION_CODE</code>目标未找到异常状态码404
	 */
	public static final int TARGET_NOT_EXIST_EXCEPTION_CODE = HttpStatus.NOT_FOUND.value();

	/**
	 * <code>TARGET_ACCESS_FORBIDDEN_EXCEPTION_CODE</code>目标禁止访问异常状态码403
	 */
	public static final int TARGET_ACCESS_FORBIDDEN_EXCEPTION_CODE = HttpStatus.FORBIDDEN.value();

	/**
	 * <code>TARGET_EXIST_EXCEPTION_CODE</code>目标已存在异常状态码409
	 */
	public static final int TARGET_EXIST_EXCEPTION_CODE = HttpStatus.CONFLICT.value();

	/**
	 * <code>DATA_EXPIRE_EXCEPTION_CODE</code>数据已过期异常410
	 */
	public static final int DATA_EXPIRE_EXCEPTION_CODE = HttpStatus.GONE.value();

}
